#! python
# -*- coding: UTF-8 -*-
"""
@Project ：data_gateway 
@File    ：config.py.py
@IDE     ：PyCharm 
@Author  ：zhangyiheng
@Date    ：2025/2/27 23:47 
@Describe：配置文件
"""
import os
from dotenv import load_dotenv

load_dotenv()


class Config:
    # Redis配置
    REDIS_HOST = os.getenv("REDIS_HOST", "192.168.12.10")
    REDIS_PORT = int(os.getenv("REDIS_PORT", 6379))
    REDIS_DB = int(os.getenv("REDIS_DB", 10))
    Result_DB = int(os.getenv("REDIS_DB", 11))

    # 目标接口配置
    API_ENDPOINT = "http://127.0.0.1:3899/send_sms"

    # 类型映射
    CLASS_MAPPING = {
        "持械": {"type": 1, "level": 1},
        "火患": {"type": 2, "level": 1},
        "打斗": {"type": 3, "level": 1},
        "人员": {"type": 4, "level": 2},
        "动物": {"type": 5, "level": 3}
    }

    # 固定参数
    FIXED_PARAMS = {
        "file_type": 1
    }